<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
com.sun.jersey.multipart (jersey-multipart 1.9 API)
</TITLE>


<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="com.sun.jersey.multipart (jersey-multipart 1.9 API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV PACKAGE&nbsp;
&nbsp;<A HREF="../../../../com/sun/jersey/multipart/file/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/sun/jersey/multipart/package-summary.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<H2>
Package com.sun.jersey.multipart
</H2>
JAX-RS Integration with MIME MultiPart Message Formats
<P>
<B>See:</B>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#package_description"><B>Description</B></A>
<P>

<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/sun/jersey/multipart/BodyPart.html" title="class in com.sun.jersey.multipart">BodyPart</A></B></TD>
<TD>A mutable model representing a body part nested inside a MIME MultiPart
 entity.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/sun/jersey/multipart/BodyPartEntity.html" title="class in com.sun.jersey.multipart">BodyPartEntity</A></B></TD>
<TD>Proxy class representing the entity of a <A HREF="../../../../com/sun/jersey/multipart/BodyPart.html" title="class in com.sun.jersey.multipart"><CODE>BodyPart</CODE></A> when a
 <A HREF="../../../../com/sun/jersey/multipart/MultiPart.html" title="class in com.sun.jersey.multipart"><CODE>MultiPart</CODE></A> entity is received and parsed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/sun/jersey/multipart/Boundary.html" title="class in com.sun.jersey.multipart">Boundary</A></B></TD>
<TD>Utility for creating boundary parameters.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/sun/jersey/multipart/FormDataBodyPart.html" title="class in com.sun.jersey.multipart">FormDataBodyPart</A></B></TD>
<TD>Subclass of <A HREF="../../../../com/sun/jersey/multipart/BodyPart.html" title="class in com.sun.jersey.multipart"><CODE>BodyPart</CODE></A> with specialized support for media type
 <code>multipart/form-data</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/sun/jersey/multipart/FormDataMultiPart.html" title="class in com.sun.jersey.multipart">FormDataMultiPart</A></B></TD>
<TD>Subclass of <A HREF="../../../../com/sun/jersey/multipart/MultiPart.html" title="class in com.sun.jersey.multipart"><CODE>MultiPart</CODE></A> with specialized support for media type
 <code>multipart/form-data</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/sun/jersey/multipart/MultiPart.html" title="class in com.sun.jersey.multipart">MultiPart</A></B></TD>
<TD>A mutable model representing a MIME MultiPart entity.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/sun/jersey/multipart/MultiPartConfig.html" title="class in com.sun.jersey.multipart">MultiPartConfig</A></B></TD>
<TD>Injectable JavaBean containing the configuration parameters for
 <code>jersey-multipart</code> as used in this particular application.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/sun/jersey/multipart/MultiPartMediaTypes.html" title="class in com.sun.jersey.multipart">MultiPartMediaTypes</A></B></TD>
<TD>Convenience <A HREF="http://jsr311.java.net/nonav/releases/1.1/javax/ws/rs/core/MediaType.html?is-external=true" title="class or interface in javax.ws.rs.core"><CODE>MediaType</CODE></A> (and associated String)
 manifest constants.</TD>
</TR>
</TABLE>
&nbsp;

<P>

<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Annotation Types Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/sun/jersey/multipart/FormDataParam.html" title="annotation in com.sun.jersey.multipart">FormDataParam</A></B></TD>
<TD>Binds the named body part(s) of a "multipart/form-data" request
 entity body to a resource method parameter.</TD>
</TR>
</TABLE>
&nbsp;

<P>
<A NAME="package_description"><!-- --></A><H2>
Package com.sun.jersey.multipart Description
</H2>

<P>
<h3>JAX-RS Integration with MIME MultiPart Message Formats</h3>

 <p>The classes in this package provide for integration of
 <code>multipart/*</code> request
 and response bodies in a JAX-RS runtime environment.  The set of registered
 providers is leveraged, in that the content type for a body part of such a
 message reuses the same MessageBodyReader/MessageBodyWriter implementations
 as would be used for that content type as a standalone entity.</p>

 <p>For more information on the syntax and semantics of MIME multipart streams,
 see the following RFCs:</p>
 <ul>
 <li><a href="http://www.ietf.org/rfc/rfc2045.txt">Multipurpose Internet Mail
     Extensions (MIME) Part One:  Format of Internet Message Bodies</a>
     (RFC 2045)</li>
 <li><a href="http://www.ietf.org/rfc/rfc2046.txt">Multipurpose Internet Mail
     Extensions (MIME) Part Two:  Media Types</a> (RFC 2046)</li>
 <li><a href="http://www.ietf.org/rfc/rfc2047.txt">Multipurpose Internet Mail
     Extensions (MIME) Part Three:  Message Header Extensions for Non-ASCII
     Text</a> (RFC 2047)</li>
 <li><a href="http://www.ietf.org/rfc/rfc2048.txt">Multipurpose Internet Mail
     Extensions (MIME) Part Four:  Registration Procedures</a> (RFC 2048)</li>
 <li><a href="http://www.ietf.org/rfc/rfc2048.txt">Multipurpose Internet Mail
     Extensions (MIME) Part Five:  Conformance Criteria and Examples</a>
     (RFC 2049)</li>
 </ul>

 <h4>Implementation Notes</h4>

 <p>The following notes describe significant aspects of the implementation
 of the MIME MultiPart APIs in this (and related) packages:</p>
 <ul>
 <li>Although packaged as a Jersey extension, the runtime code in this
     library should be portable to any compliant JAX-RS implementation.
     Jersey is only required for execution of the unit tests.</li>
 </ul>

 <h4>Supported MIME Multipart Capabilities</h4>

 <p>The following list of general MIME MultiPart features is currently
 supported:</p>
 <ul>
 <li>The <code>MIME-Version: 1.0</code> HTTP header is included on generated
     responses.  It is accepted, but not required, on processed requests.</li>
 <li>A <code>MessageBodyReader</code> implementation for consuming MIME
     MultiPart entities.  See below for usage restrictions.</li>
 <li>A <code>MessageBodyWriter</code> implementation for producing MIME
     MultiPart entities.  The appropriate <code>Provider</code> is used to
     serialize each body part, based on its media type.</li>
 <li>Optional creation of an appropriate <code>boundary</code> parameter on a
     generated <code>Content-Type</code> header, if not already present.</li>
 <li>Top level content type of <code>multipart</code>, with the following
     supported subtypes:  <code>alternative</code>, <code>digest</code>,
     <code>mixed</code>, and <code>parallel</code>.</li>
 </ul>

 <p>At present, the <code>MessageBodyReader</code> implementation exhibits a
 usability issue.  It is not currently possible to know ahead of time what
 Java class the application would prefer to use for each individual body part,
 so an appropriate <code>Provider</code> cannot be selected.  Currently, the
 unparsed content of each body part is returned (as a byte array) in the
 <code>entity</code> property of the returned <code>BodyPart}</code> instance, and
 the application can decide what further steps are needed based on the
 headers included in that body part.  The simplest technique is to examine
 the received <code>BodyPart</code>, and then call the <code>getEntityAs()</code>
 method once you know which implementation class you would prefer.</p>

 <h4>Not (Yet) Supported MIME Multipart Capabilities</h4>

 <p>The following list of general MIME MultiPart features is NOT (yet, in
 most cases) supported:</p>
 <ul>
 <li>The <code>charset</code> parameter on the <code>Content-Type</code> header
     field.  Currently, the hard coded charset is FIXME.  [RFC2045#5.2]</li>
 <li>The <code>Content-Transfer-Encoding</code> header field.  [RFC2045#6]</li>
 <li>The <code>message/*</code> family of content types.</li>
 </ul>
<P>

<P>
<DL>
</DL>
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV PACKAGE&nbsp;
&nbsp;<A HREF="../../../../com/sun/jersey/multipart/file/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/sun/jersey/multipart/package-summary.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &#169; 2011 <a href="http://www.oracle.com/">Oracle Corporation</a>. All Rights Reserved.
</BODY>
</HTML>
